package cn.livingCloud.dto;

import cn.livingCloud.entity.content.ArticleReply;
import cn.livingCloud.entity.content.ImageTextReply;
import cn.livingCloud.wechat.protocol.resp.Article;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 唐旭 on 2015/12/26.
 */
public class ArticlesFormDto {
    private String uuid;
    private List<ArticleReplyDto> articleList = new ArrayList<>();

    public ArticlesFormDto() {
    }

    public ArticlesFormDto(ImageTextReply articles) {
        this.uuid = articles.getUuid();
        for (Article article : articles.getArticles()) {
            ArticleReply reply = (ArticleReply) article;
            articleList.add(new ArticleReplyDto(reply));
        }
    }

    public String getUuid() {
        return uuid;
    }

    public ArticlesFormDto setUuid(String uuid) {
        this.uuid = uuid;
        return this;
    }

    public List<ArticleReplyDto> getArticleList() {
        return articleList;
    }

    public ArticlesFormDto setArticleList(List<ArticleReplyDto> articleList) {
        this.articleList = articleList;
        return this;
    }
}
